using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace BB.Processes.Models.Mapping
{
    public class ReporteMap : EntityTypeConfiguration<Reporte>
    {
        public ReporteMap()
        {
            // Primary Key
            this.HasKey(t => t.Id);

            // Properties
            this.Property(t => t.Message)
                .IsRequired();

            // Table & Column Mappings
            this.ToTable("Reportes");
            this.Property(t => t.Id).HasColumnName("Id");
            this.Property(t => t.ReportType).HasColumnName("ReportType");
            this.Property(t => t.Message).HasColumnName("Message");
            this.Property(t => t.State).HasColumnName("State");
            this.Property(t => t.CreatedDate).HasColumnName("CreatedDate");
        }
    }
}
